package com.aiolos.spring08;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Bean1 {

    private AnotherBean anotherBean1;

    //通过构造方法注入Bean
    @Autowired
    public Bean1(AnotherBean anotherBean1) {
        this.anotherBean1 = anotherBean1;
    }
}
